package Popup;

import Composite.*;
import java.awt.event.*;
import javax.swing.JOptionPane;


class ControleurAjouterUnAlbumLogique implements ActionListener{
    
        private Element el;
    
    public ControleurAjouterUnAlbumLogique(Element el){
        
        this.el=el;
    }
    
    
    public void actionPerformed(ActionEvent e) {
        
        String reponse=JOptionPane.showInputDialog(null, "Nom de l'Album: ", "Ajouter un Album", JOptionPane.INFORMATION_MESSAGE);

        if(reponse!=null){
            
            Dossier d=new Dossier(el,null,reponse);
            el.addChild(d,el.getIndex(d));
        }
    }
}

